import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    component: () => import('../layouts/MainLayout.vue'),
    children: [
      {
        path: '',
        name: 'Home',
        component: () => import('../views/Home.vue')
      },
      {
        path: 'departments',
        name: 'Departments',
        component: () => import('../views/Departments.vue')
      },
      {
        path: 'employees',
        name: 'Employees',
        component: () => import('../views/Employees.vue')
      },
      {
        path: 'products',
        name: 'Products',
        component: () => import('../views/Products.vue')
      },
      {
        path: 'manufacturers',
        name: 'Manufacturers',
        component: () => import('../views/Manufacturers.vue')
      },
      {
        path: 'department-products',
        name: 'DepartmentProducts',
        component: () => import('../views/DepartmentProducts.vue')
      },
      {
        path: 'manufacturer-products',
        name: 'ManufacturerProducts',
        component: () => import('../views/ManufacturerProducts.vue')
      }
    ]
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router 